package com.junjie.blibli;


import com.junjie.blibli.service.webSocket.WebSocketService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableTransactionManagement
@EnableScheduling
@EnableAsync
public class BliBliApp {
    public static void main(String[] args){
        ApplicationContext app = SpringApplication.run(BliBliApp.class,args);
        //将上下文对象放到static全局变量中共享，应用于多例webSocket里面
        WebSocketService.setApplicationContext(app);
    }

}
